<template>
  <div class="container">
    <div class="row pt-5">
      <div class="col-md-12">
        <div class="card">
          <div class="card-body">
            <h5 class="card-title">医院方系统</h5>
            <div class="input-group mb-3">
              <span class="input-group-text">疫苗溯源地址</span>
              <input
                id="id2"
                type="text"
                class="form-control"
                placeholder="输入疫苗溯源地址"
              />
            </div>
            <div class="input-group mb-3">
              <span class="input-group-text">疫苗医院接收时间</span>
              <input
                id="time3"
                type="datetime-local"
                class="form-control"
                placeholder="输入运输日期"
              />
            </div>
            <div class="input-group mb-3">
              <span class="input-group-text">输入接收医院地址</span>
              <input
                id="addr3"
                type="text"
                class="form-control"
                placeholder="输入接收医院地址"
              />
            </div>
            <button
              class="btn btn-primary"
              type="button"
              id="arriveHospital"
              @click="arriveHospital"
            >
              疫苗接收完成
            </button>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "MyHospital",
  methods: {
    async arriveHospital() {
      var id2 = $("#id2").val();
      var time3 = $("#time3").val();
      var addr3 = $("#addr3").val();
      await this.$Appjs.methods
      .arriveHospital(id2,time3.toString(),addr3).send({
        from: "0xbD7eFb6A883186bf6Bd53Ad1DcA58465276cfCac",
        // gas: 150000,
        // gasPrice: 3000000000,
        //value: 3000000,
      });
      alert('医院接收成功')
    },
  },
};
</script>

<style>
</style>